fix: use unified classifier in classification endpoints#213
fix: use unified classifier in classification endpoints#213OneZero-Y wants to merge 1 commit intovllm-project:mainfrom
Conversation
Fix API endpoints returning placeholder responses instead of real results. Modified ClassifyIntent, DetectPII, CheckSecurity to prioritize unified classifier over legacy classifier. Signed-off-by: OneZero-Y <aukovyps@163.com>
❌ Deploy Preview for vllm-semantic-router failed.
|
👥 vLLM Semantic Team NotificationThe following members have been identified for the changed files in this PR and have been automatically assigned: 📁
|
|
Is i walk through the code, and find out that ext_proc uses the legacy classifier If a legacy classifier use the modernBert model and the unifiedClassifier prefer lora model. and these two may return different category results. for example: user input is. "3*5=?" |
|
@AkisAya You're absolutely right! Legacy Model (category_classifier_modernbert-base_model): 14 categories including "math" Re-train LoRA models with complete category sets matching the legacy model and sufficient training data for math/science domains. |
| for _, piiType := range piiResult.PIITypes { | ||
| entity := PIIEntity{ | ||
| Type: piiType, | ||
| Value: "[DETECTED]", // Placeholder - unified classifier doesn't provide exact positions yet |
There was a problem hiding this comment.
The token sequence classifier should have the location index. Can you follow up in another PR? Thanks
| // Convert SecurityResult to SecurityResponse format | ||
| if len(securityResults) == 0 { | ||
| return &SecurityResponse{ | ||
| IsJailbreak: false, |
There was a problem hiding this comment.
why using hardcoded values? no security result can have a special output but a hardcoded response like this is a bit confusing.

What type of PR is this?
fix: use unified classifier in classification endpoints
What this PR does / why we need it:
Which issue(s) this PR fixes:
fix: #210